package com.lt.test.provider.service;

import com.alibaba.dubbo.config.annotation.Service;
import com.lt.test.api.QstiairesServicr;
import com.lt.test.provider.dao.QstiairesDao;
import org.apache.log4j.Logger;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * @author lt
 * @date 2018/11/17 14:28
 */
@Service(version = "1.0.0")
public class QstiairesServicrImpl implements QstiairesServicr {
    private Logger logger = Logger.getLogger(QstiairesServicrImpl.class);

    @Resource
    private QstiairesDao qstiairesDao;

    @Override
    public List<Map<String, Object>> getQstiaires(Map<String, Object> parameter) {
        String custCode = parameter.get("custCode") == null ? "" : parameter.get("custCode").toString();
        String slsmanName = parameter.get("slsmanName") == null ? "" : parameter.get("slsmanName").toString();
        String channelName = parameter.get("channelName") == null ? "" : parameter.get("channelName").toString();
        String custCodeTop = parameter.get("custCodeTop") == null ? "" : parameter.get("custCodeTop").toString();
        String custName = parameter.get("custName") == null ? "" : parameter.get("custName").toString();
        return qstiairesDao.getQstiaires(custCode, slsmanName, channelName, custCodeTop, custName);
    }

    @Override
    public List<Map<String, Object>> getQstiairesStock() {
        return qstiairesDao.getQstiairesStock();
    }


}
